import { get, fileUpload, post } from "./request";
import axios from "axios";
axios.defaults.withCredentials = true;

export const getAllNum = (params) => get("/workTimeController/search", params);

//文件上传
export const workFileUpload = (inParam) => fileUpload("/workTimeController/fileUpload", inParam)
//获取项目
export const searchIoNumber = (params) => get("/workTimeController/searchIoNumber", params)

//获取验证码
export const getCode = (param) => get("/api/getCode", param)

//登录
export const login = (param) => get("/api/login", param)

// 工时用户登录
export const countLogin = (param) => get("/login/userLogin", param);

//更新用户权限
export const updateUserAuth = (data) =>get("/login/updateUserAuth", data);

//添加一个用户
export const insertUser = (data) => post("/login/addNewUser", data);

//删除一个用户
export const delUser = (inParam) =>get("/login/delUser", inParam);

//查询用户分页
export const searchUser = (inParam) =>get("/login/searchUser", inParam);

//新增一个员工工作时间
export const addUserWorkCount = (param) => post("/workTimeController/insertWorkCount", param)

//关闭项目
export const closeProject = (param) => get("/workTimeController/closeProject",param)

//添加一个log记录
export const addUserLog = (paramData) => post("/log/addLog",paramData);

//查询log记录
export const searchLog = (paramData) => get("/log/searchLog",paramData);

//查询summary 详细月同时
export const searchDetail = (paramData) =>get("/workTimeController/searchDetail",paramData)